package com.cskaoyan.wordmemorize.controller.app;

import com.cskaoyan.wordmemorize.dto.admin.GoodsDTO;
import com.cskaoyan.wordmemorize.dto.admin.PageDTO;
import com.cskaoyan.wordmemorize.request.PageRequest;
import com.cskaoyan.wordmemorize.service.impl.app.AppGetProductServiceImpl;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@Tag(name = "移动端-商品模块")
@RestController
public class AppGetProductController {
    @Autowired
    AppGetProductServiceImpl appGetProductService;
    @GetMapping("product")
    public PageDTO<GoodsDTO> product(@RequestBody PageRequest request) {
        PageDTO<GoodsDTO> productsPage = appGetProductService.getProductsPage(request);
        return productsPage;
    }
}
